﻿using DapperExtensions.Mapper;
using Newtonsoft.Json;

namespace ZilLion.Service.ZilLionOss.Domain.Entitys
{
    /// <summary>
    ///     岗位设置
    /// </summary>
    public class OssRoleEntity
    {
        [JsonProperty("roleid")]
        public long RoleId { get; set; }

        [JsonProperty("rolename")]
        public string RoleName { get; set; }

        [JsonProperty("roledesc")]
        public string RoleDesc { get; set; }

        [JsonProperty("zlcompanykey")]
        public string ZlCompanyKey { get; set; }
    }

    public class OssRoleEntityMapper : ClassMapper<OssRoleEntity>
    {
        public OssRoleEntityMapper()
        {
            Table("oss_role");
            Map(f => f.RoleId).Column("roleid").Key(KeyType.Assigned);
            Map(f => f.RoleName).Column("rolename");
            Map(f => f.RoleDesc).Column("roledesc");
            Map(f => f.ZlCompanyKey).Column("zlcompanykey");
        }
    }
}